package com.ptu.spzx.feign.userInfo;

import com.github.pagehelper.PageInfo;
import com.ptu.spzx.model.entity.user.UserInfo;
import com.ptu.spzx.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "service-user")
public interface UserInfoFeignClient {
    //设置班级
    @GetMapping("/api/user/userInfo/setClassId/{stuIds}")
    public Result setClassId(@PathVariable("stuIds") List<String> stuIds,@RequestParam(value = "className") String className);
    //获取学生的详细信息
    @GetMapping("/api/user/userInfo/getStu/{stuId}")
    public UserInfo getStu(@PathVariable("stuId") String stuId);
    //获取学生详细信息列表
    @GetMapping("/api/user/userInfo/getStuList")
    public List<UserInfo> getStuList(@RequestParam("className") String className);

    @GetMapping("/api/user/userInfo/getStuListByClass")
    public List<String> getStuListByClass(@RequestParam("className") String className);

    @GetMapping("/api/user/userInfo/setClassNull")
    public Result setClassNull(@RequestParam("className") String className);

    @GetMapping("/api/user/userInfo/getStuListByClassName/{pageNum}/{pageSize}")
    public PageInfo<UserInfo> getStuListByClassName(@RequestParam("classNames") List<String> classNames
                                                    , @PathVariable("pageNum") Integer pageNum,
                                                    @PathVariable("pageSize")Integer pageSize);

    @GetMapping("/api/user/userInfo/addCourseUser")
    public Result addCourseUser(@RequestParam(value = "teachIds") List<Long> teachIds,@RequestParam Long courseId);

    @GetMapping("/api/user/userInfo/deleteCourseUser")
    public Result deleteCourseUser(@RequestParam Long curseId);

    @GetMapping("/api/user/userInfo/selectCourseIdByteachId")
    public List<Long> selectCourseIdByteachId(@RequestParam Long teachId);

    @GetMapping("/api/user/userInfo/selectTeacherIdByCourseId")
    public List<Long> selectTeacherIdByCourseId(@RequestParam Long courseId);

    @GetMapping("/api/user/userInfo/getStuListByStuIds")
    public List<UserInfo> getStuListByAllStuId(@RequestParam("stuIds") List<String> stuIds);
}
